// pages/classify/classify.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    index:"0",
    classli: [{
      name: "热门推荐",
      goods: [{
        goodsname: "热门推荐",
        goodsli: [
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
          {
            goodsliImg: "/images/goodsliImg1.png",
            goodsliName: "手机"
          },
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
          {
            goodsliImg: "/images/goodsliImg1.png",
            goodsliName: "手机"
          },
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
          {
            goodsliImg: "/images/goodsliImg1.png",
            goodsliName: "手机"
          },
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
          {
            goodsliImg: "/images/goodsliImg1.png",
            goodsliName: "手机"
          },
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
          {
            goodsliImg: "/images/goodsliImg1.png",
            goodsliName: "手机"
          },
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
          {
            goodsliImg: "/images/goodsliImg1.png",
            goodsliName: "手机"
          },
          {
            goodsliImg: "/images/goodsliImg2.png",
            goodsliName: "风扇"
          },
        ]
      }]
    },
    {
      name: "生活家电",
      goods: [{
          goodsname: "生活家电",
          goodsli: [{
              goodsliImg: "/images/goodsliImg1.png",
              goodsliName: "手机"
            },
            {
              goodsliImg: "/images/goodsliImg2.png",
              goodsliName: "风扇"
            },
            {
              goodsliImg: "/images/goodsliImg1.png",
              goodsliName: "手机"
            },
            {
              goodsliImg: "/images/goodsliImg2.png",
              goodsliName: "风扇"
            },
            {
              goodsliImg: "/images/goodsliImg1.png",
              goodsliName: "手机"
            },
            {
              goodsliImg: "/images/goodsliImg2.png",
              goodsliName: "风扇"
            }
          ]
        },
        {
          goodsname: "生活电器",
          goodsli: [{
              goodsliImg: "/images/goodsliImg1.png",
              goodsliName: "手机"
            }
          ]
        }
      ]
    },
    {
      name: "居家生活",
      goods: []
    },
    {
      name: "大家电",
      goods: []
    },
    {
      name: "苏宁生鲜",
      goods: []
    },
    {
      name: "食品酒水",
      goods: []
    }
  ],
    leftdate:[{
      name: "热门推荐",
      goods: [{
        goodsname: "热门推荐",
        goodsli: [
          {
            goodsliImg: "/images/goodsliImg1.png",
            goodsliName: "手机"
          }
          
        ]
      }]
    }]
  },
  check(e){
    let {index} = e.currentTarget.dataset;
    this.data.index = index;
    this.data.leftdate = this.data.classli[index];
    // console.log(this.data.leftdate);
    this.setData({
      leftdate:this.data.leftdate
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})